// import { fileURLToPath, URL } from 'node:url'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path';
import { defineConfig, loadEnv } from 'vite';
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
  ],
  resolve: {
    alias: {
      '@': resolve(__dirname, 'src'),
    }
  },
  build: {
    rollupOptions: {
      assetsDir: 'assets', // 设置整体资源输出的文件夹名
      output: {
        assetFileNames: 'assets/ddos-service/[name]-[hash][extname]', // 设置资源文件的命名规则和路径
        chunkFileNames: 'assets/ddos-service.js',
        entryFileNames: 'assets/ddos-service.js',
      },
    },
  }
})
